package com.hcinfos.gsoo.enity;

import java.io.Serializable;
import java.util.List;

import com.amap.api.services.poisearch.Photo;

public class ViewSuppSearchExt extends ViewSuppDetail implements
		Comparable<ViewSuppSearchExt>, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3848415836506204788L;

	/**
	 * 
	 */
	private Double distance;

	// 新添加
	private String dataType = TYPES[0];
	public static final String[] TYPES = { "self", "other" }; // self自己的数据
	public List<UrlImage> photos;
	public String envirRating;
	public String serviceRating;
	public String tasteRating;
	public String rating;
	public String poid;
	public String typeId;
	public String tempPath;

	
	public String getTempPath() {
		return tempPath;
	}

	public void setTempPath(String tempPath) {
		this.tempPath = tempPath;
	}

	public String getPoid() {
		return poid;
	}

	public void setPoid(String poid) {
		this.poid = poid;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getEnvirRating() {
		return envirRating;
	}

	public void setEnvirRating(String envirRating) {
		this.envirRating = envirRating;
	}

	public String getServiceRating() {
		return serviceRating;
	}

	public void setServiceRating(String serviceRating) {
		this.serviceRating = serviceRating;
	}

	public String getTasteRating() {
		return tasteRating;
	}

	public void setTasteRating(String tasteRating) {
		this.tasteRating = tasteRating;
	}

	public String getRating() {
		return rating;
	}

	public void setRating(String rating) {
		this.rating = rating;
	}

	public Double getDistance() {
		return distance;
	}

	public void setDistance(Double distance) {
		this.distance = distance;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public List<UrlImage> getPhotos() {
		return photos;
	}

	public void setPhotos(List<UrlImage> photos) {
		this.photos = photos;
	}

	@Override
	public boolean equals(Object obj) {
		ViewSuppSearchExt s = (ViewSuppSearchExt) obj;
		return suppName.equals(s.suppName) && telPhone.equals(s.telPhone);
	}

	@Override
	public int hashCode() {
		String in = suppName + telPhone;
		return in.hashCode();
	}

	@Override
	public int compareTo(ViewSuppSearchExt another) {
		if (this.getDistance() > another.getDistance()) {
			return 1;
		} else {
			return -1;
		}
	}

}
